package week6;

public class Student {
    private String name;
    private int age;
    private String school;
    private String major;
    public Student(String name,int age){
        this.name=name;
        this.age=age;
    }
    public Student(String name,int age,String school){
        this.name=name;
        this.age=age;
        this.school=school;
    }
    public Student(String name,int age,String school,String major){
        this.name=name;
        this.age=age;
        this.school=school;
        this.major=major;
    }
    public void show(){
        System.out.println("名："+name+"年龄："+age+"学校："+school+"专业："+major);
    }
    public String show2() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", school='" + school + '\'' +
                ", major='" + major + '\'' +
                '}';
    }
}